(abort "This installer script needs to use the ARexx utility rx.\n\nPlease make sure the rx utility is installed in sys:rexxc and try to install again."))
(if (> (run "assign SlateRexx: EXISTS" (safe)) 0)
(set DefaultUpdate 0)
(set DefaultUpdate 1)
)
(set SlateUpdate
(askchoice
(prompt "Select which kind of AmiSlate install you want:")
(choices "First Time Install" "Update")
(default DefaultUpdate)
(help "If you've never installed AmiSlate on your system before, select First Time Install. If you've alread installed an earlier version, select Update. In an update, no new AmiSlate drawer will be created.")
(prompt "For correct operation, AmiSlate needs two assigns to be present. These assigns are \n\nSlateRexx: and SlateScripts:\n\n and should be assigned to the installed directories with the same names. Do you wish me to put the appropriate assigns in your s:user-startup?")
(help "Sometimes a remote AmiSlate client will request the local one to run an ARexx macro or a AmiSlate recording. These assigns will be the default directories for these scripts.")
(command AssignString)
)
(run AssignString)
)
)
; if We have a network package installed...
(if (< NetworkPackage 2)
; if the proper assign (AmiTCP: or inet:) is not present...
(if (> CheckThisAssign 0)
; give a nice error message to that effect.
(message (cat "\n\n" NetName " does not appear to be set up on your system. (i.e. there is no " DefDir " assign!) Because of this, I am unable to configure the " DefDir "db/services and " DefDir "db/inetd.conf files.\n\nIf you wish to use the network functions of AmiSlate, you will need to set up " NetName " and install again."))
; otherwise put our line into the config files
(
; make sure correct the entry is written in the services file
(prompt (cat "\nIf you plan to run AmiSlate in conjunction with " NetName ", the line:\n\nAmiSlate 2955/tcp\n\nneeds to be present in your " DefDir "db/services file. Do you wish me to add it? (The old services file will be saved to services.bak)"))
(help (cat "Including this line in your " DefDir "db/services file tells " NetName "'s inet daemon that all requests on port 2955 should be sent to the AmiSlate program for further processing. If this line is not included, you will not be able to receive AmiSlate requests from other people. The ARexx script included with this archive is smart enough to add the line or change an existing line, and the original file will be copied to services.bak before it is updated."))
(confirm)
)
; make sure correct the entry is written in the inetd.conf file
(set InetDPrompt (cat "Also, if you plan run AmiSlate in conjunction with " NetName ", the line:\n\n" InetDString "\n\nneeds to be present in your " DefDir "db/inetd.conf file. Do you wish me to append/change this line to that file?\n\n(I recommend yes, even if you are only updating from v1.3, as the executable name has changed)"))
(help (cat "Including this line in your " DefDir "db/inetd.conf file tells " NetName " which program to run whenever it gets an AmiSlate request. It is important that the file path and name in this line reflect the location of the AmiSlate executable. The ARexx script included with this archive is smart enough to add the line or change an existing line, and the original file will be copied to inetd.conf.bak before it is updated."))
(confirm)
)
)
)
)
; all done
(message "\n\nAmiSlate is now installed. Reboot your Amiga (just to be certain all assigns are made, etc.) and try it out!")